package util.enumhelper;

import java.io.Serializable;

import util.enumeration.IndustryType;
import util.enumeration.Language;

/**
 *
 * @author KohLi
 */
public class LocalizedIndustryType implements Serializable{
     // alphabetical order
    public static String getLocalizedIndustryTypeAsString(IndustryType industryType, String locale) {
        String localizedIndustryType = "";
        
        // en_US ENGLISH, UNITED STATES
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_US))) {
            localizedIndustryType = getIndustryType_EN_US(industryType);
        }
        // en_SG ENGLISH, SINGAPORE
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.ENGLISH_SINGAPORE))) {
            localizedIndustryType = getIndustryType_EN_SG(industryType);
        }
        // ms_MY MALAY, MALAYSIA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.MALAY))) {
            localizedIndustryType = getIndustryType_MS_MY(industryType);
        }
        
        // zh_CN CHINESE, CHINA
        else
        if (locale.equals(SupportedLocale.getSupportedLocaleStringByLanguage(Language.CHINESE_CHINA))) {
            localizedIndustryType = getIndustryType_ZH_CN(industryType);
        }
        // other language...
        else {
            localizedIndustryType = getIndustryType_EN_US(industryType);
        }
        
        return localizedIndustryType;
    }
    
    
    // simplified chinese (zh_CN)
    private static String getIndustryType_ZH_CN(IndustryType industryType) {
        String localizedIndustryType = "";
        
        switch (industryType) {
            case ACCOMMODATION: localizedIndustryType = "食品与饮料" ; break; 
            case EVENT: localizedIndustryType = "酒店业"; break;
            case FnB: localizedIndustryType = "旅游景点"; break;
            case PLACEOFINTEREST: localizedIndustryType = "活动"; break;
            
        }
        return localizedIndustryType;
    }
    
    // default (en_US)
    private static String getIndustryType_EN_US(IndustryType industryType) {
        String localizedIndustryType = "";
        
        switch (industryType) {
            case ACCOMMODATION: localizedIndustryType = "Accommodation" ; break;
            case EVENT: localizedIndustryType = "Events"; break;
            case FnB: localizedIndustryType = "Food and Beverages"; break;
            case PLACEOFINTEREST: localizedIndustryType = "Place of Interest"; break;
            
        }
        return localizedIndustryType;
    }
    
    // singapore english (en_SG)
    private static String getIndustryType_EN_SG(IndustryType industryType) {
        String localizedIndustryType = "";
        
        switch (industryType) {
          case ACCOMMODATION: localizedIndustryType = "Accommodation" ; break;
            case EVENT: localizedIndustryType = "Events"; break;
            case FnB: localizedIndustryType = "Food and Beverages"; break;
            case PLACEOFINTEREST: localizedIndustryType = "Place of Interest"; break;
         
        }
        return localizedIndustryType;
    }
    
    // bahasa malaysia (ms_MY)
    private static String getIndustryType_MS_MY(IndustryType industryType) {
        String localizedIndustryType = "";
        
        switch (industryType) {
            case ACCOMMODATION: localizedIndustryType = "Penginapan" ; break;
            case EVENT: localizedIndustryType = "Acara"; break;
            case FnB: localizedIndustryType = "F & B pihak berkepentingan"; break;
            case PLACEOFINTEREST: localizedIndustryType = "Tempat-intrerest"; break;
            //case MORETHAN$100: localizedIndustryType = "lebih daripada 100 dolar"; break;
        }
        return localizedIndustryType;
    }
    
    
}
